package javase.javase01.exercise07;

import java.io.*;

/**
 * @author: Gan
 * @date 2021/4/19 0019 15:04
 * @description:
 **/
public class PrintUtils {
    OutputStream out;

    public PrintUtils(OutputStream out) {
        this.out = out;
    }

    public void printInt(int a) throws IOException {
        String str = String.valueOf(a);
        out.write(str.getBytes());
    }

    public void printIntLn(int a) throws IOException {
        String str = String.valueOf(a);
        out.write(str.getBytes());
        out.write(System.lineSeparator().getBytes());
    }

    public void printDouble(double a) throws IOException {
        String str = String.valueOf(a);
        out.write(str.getBytes());
    }

    public void printDoubleLn(double a) throws IOException {
        String str = String.valueOf(a);
        out.write(str.getBytes());
        out.write(System.lineSeparator().getBytes());
    }

    public void close() throws IOException {
        out.close();
    }
}

class Test {
    public static void main(String[] args) throws IOException {
       // BufferedWriter bw = new BufferedWriter(new FileWriter("a.txt"));


    }
}